package com.youlai.system.converter;

import com.youlai.system.common.model.Option;
import com.youlai.system.model.entity.Manage;

import com.youlai.system.model.entity.SysRole;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ManagerConverter {

    @Mappings({
            @Mapping(target = "value", source = "id"),
            @Mapping(target = "label", source = "manageName")
    })
    Option entity2Option(Manage manage);

    List<Option> entityListToOptionList(List<Manage> manageList);

}

